<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/common.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../css/templet.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../fonts/font-awesome.min.css?01_38"/>
		<link rel="stylesheet" type="text/css" href="../mui/css/mui.css?01_38"/>
		
		<!--公共js-->
		<script type="text/javascript" src="../common/js/jquery.js?01_38"></script>
		
		<!--插件-->
		<script type="text/javascript" src="../common/js/vue.min.js?01_38"></script>
		<script type="text/javascript" src="../common/js/mui.min.js?01_38"></script>
		
		<script type="text/javascript" src="../common/js/fastclick.js?01_38"></script>
		<script type="text/javascript" src="../common/js/common.js?01_38"></script>
		<script type="text/javascript" src="../common/js/my_common.js?01_38"></script>
		<script type="text/javascript" src="../common/js/main.js?01_38"></script>
		<script type="text/javascript" src="../common/js/app.js?01_38"></script>
	</head>
	<body>
		<div class="wrap_body discount_coupon" id="app" v-cloak>
			
			<header class="pr bg-red9 fff f-20 pad-t-10 pad-b-25 pad-l-10 pad-r-10">
				<div class="pa back" onClick="back()"><a></a></div>
				<div class="center"></div>
			</header>
			
			<div class="content">
				
				
				<div class="pad-r-10 pad-l-10 pad-t-70 center">
					<div><a class="bg-red9 fff pad-t-15 pad-b-15 pad-l-70 pad-r-70 f-15 btn" @click="sure">确定</a></div>
				</div>
			</div>
			
			<div class="number-key">
				<ul class="cf f-24">
					<li @click="numberk(1)"><span>1</span></li>
					<li @click="numberk(2)"><span>2</span></li> 
					<li @click="numberk(3)"><span>3</span></li> 
					<li @click="numberk(4)"><span>4</span></li> 
					<li @click="numberk(5)"><span>5</span></li> 
					<li @click="numberk(6)"><span>6</span></li> 
					<li @click="numberk(7)"><span>7</span></li> 
					<li @click="numberk(8)"><span>8</span></li> 
					<li @click="numberk(9)"><span>9</span></li> 
					<li @click="numberk('C')"><span>C</span></li> 
					<li @click="numberk(0)"><span>0</span></li> 
					<li @click="numberk('d')"><span><img src="../images/w/del.png"></span></li>
				</ul>
			</div>
			
		</div>
	</body>
	
	
	<script type="text/javascript">
		var app = null;
		function fun1 () {
			app = new Vue({
				el:"#app",
				data:{
					couponSn:""
				},
				created:function () {
					this.init();
				},
				methods:{
					init:function () {
						
					},
					gotoart:function (e) {
						clicked(e);
					},
					numberk:function(e){//按键
				  		var n = this.couponSn;
				  		switch (e){
				  			case "d":
				  			    n = n.substring(0,n.length - 1);
				  				break;
				  			case "C":
				  				n = "";
				  				break;
				  			default:
				  				//如果长度大于6
				  				if (n.length >= 6) {
				  					return;
				  				}
				  				n += e;
				  				break;
				  		}
				  		this.couponSn = n;
				  	},
				  	sure:function () {
				  		//提示框
						var btnArray2 = [app.b_lg[1049], app.b_lg[1008]];
						mui.confirm(app.b_lg[1262], app.b_lg[1050], btnArray2, function(ee) {
							if (ee.index == 1) {
								//确定
								//跳转到扫码页
								if (isAPP) {
									var preUrl = plus.webview.currentWebview().opener(); 
									preUrl.evalJS()
								}
								com_back();
							}else{
								//取消
								app.init();
							}
						},"div")
				    },
				    scan:function () {
					  	setTimeout(function () {
					  		app.gotoart("../qrcode/qrscan.html?id=0&type=2");
					  	},300)
				    }
				}
				
			})
		}
	</script>
</html>
